/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-01-23
 * Time: 9:58
 */
public class Test {
    public void fun(int child){
        int parents=(child-1)/2;
        while(child<0){
            if(elem[parents]<elem[child]){
                int tmp=elem[parents];
                elem[parents]=elem[child];
                elem[child]=tmp;
            }else{
                break;
            }
            child=parents;
            parents=(child-1)/2;
        }
    }
    public static void main(String[] args) {

    }
}
